package br.pucrio.inf.tamdera.prolog.utils;

import br.pucrio.inf.tamdera.Constants;

public class PrologIntegrationConstants   
{

	public static final String PACKAGE_SEPARATOR_IN_TAMDERA_DSL = ".";
	
	public static final String PACKAGE_SEPARATOR_IN_TAMDERA_TO_REPLACE = "\\.";
	
	public static final String PACKAGE_SEPARATOR_IN_PROLOG = "/";
	
	public static final String mappingPrologFile = "prolog" +
			PACKAGE_SEPARATOR_IN_PROLOG +
			"mapping" + PrologIntegrationConstants.PROLOG_FORMAT;
	
	public static final String propertyMappingPrologFile = "prolog" +
			PACKAGE_SEPARATOR_IN_PROLOG +
			"propertyMapping" + PrologIntegrationConstants.PROLOG_FORMAT;
	
	public static final String antiErosionDesignRulePrologFile = "prolog" +
			PACKAGE_SEPARATOR_IN_PROLOG +
			"antiErosionRules" + PrologIntegrationConstants.PROLOG_FORMAT;
	
	
	public static final String dependencyRelationsFile = "prolog" +
			PACKAGE_SEPARATOR_IN_PROLOG +
			"dependencyRelations" + PrologIntegrationConstants.PROLOG_FORMAT;
	
	public static final String driftRelationsFile = "prolog" +
			PACKAGE_SEPARATOR_IN_PROLOG +
			"driftRelations" + PrologIntegrationConstants.PROLOG_FORMAT;
	
	public static final String utilsFile = "prolog" +
			PACKAGE_SEPARATOR_IN_PROLOG +
			"utils" + PrologIntegrationConstants.PROLOG_FORMAT;
	
	public static final String antiErosionConsistencyCheckerFile = "prolog" +
			PACKAGE_SEPARATOR_IN_PROLOG +
			"consistencyChecker" + PrologIntegrationConstants.PROLOG_FORMAT;
	
	public static final String PROLOG_FORMAT = ".pl";
	
	public static final String LINE_SEPARATOR = "\n";
	
	public static final String VIOLATION= "violation"; 
	
	public static final String UNDERLINE = "_";
	
	/*
	 * PROLOG TEMPLATE 
	 */
	
	public static final String TEMPLATE_CONSULT = "consult('%s')";
	
	/* 1s - concept name
	 * 2s - name of package using / instead of '.'
	 * 3s - name of the class or interface
	 * */
	public static final String CONCEPT_MAPPING_FACT = "conceptMap('%s',class('%s','%s')).";
	
	
	/* 1s - metric name
	 * 2s - name of package using / instead of '.'
	 * 3s - name of the class or interface
	 * 4s - value
	 * */
	public static final String METRIC_VALUE_MAPPING = "property('%s',class('%s','%s'),%s).";
	
	/*
	 * 1s - dependency type
	 * 2s - relation
	 * 3s - concept1
	 * 4s - concept2
	 */
	public static final String ANTI_EROSION_DESIGN_RULE_FACT = "%s_dependency('%s','%s','%s').";
	
	/*
	 *1 - package
	 *2 - name of the class 
	 */
	public static final String CLASS_TEMPLATE_FACT = "class('%s','%s')";
	
	public static final String INHERITS_QUERY_TEMPLATE = Constants.DEPENDENCY_RELATION_INHERITS 
			+ "(%s,%s).";

	/*
	 * 
	 */
	public static final String ALLCLASSES_QUERY_TEMPLATE = Constants.UTILS_ALL_CLASSES 
			+ "(%s,%s).";

	
}
